/*
 * @Author: 260156 260156@gree.com.cn
 * @Date: 2022-09-13 16:09:21
 * @LastEditors: 260156 260156@gree.com.cn
 * @LastEditTime: 2022-09-20 16:15:51
 * @FilePath: \gree-zst-web\types\index.ts
 * @Description:
 *
 * Copyright (c) 2022 by 260156 260156@gree.com.cn, All Rights Reserved.
 */
export type ValueOf<T> = T[keyof T];

export type RequiredAtLeastOne<
  ObjectType,
  KeysType extends keyof ObjectType = keyof ObjectType
> = KeysType extends keyof ObjectType
  ? ObjectType & Required<Pick<ObjectType, KeysType>>
  : never;
